<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	// 将 "项目路径basePath" 放入pageContext中，待以后用EL表达式读出。
	pageContext.setAttribute("basePath",basePath);
%>
<form action="${param.action}" method="post" id="id_cade_form">
	<input type="hidden" name="id" value="${model.id}">
	<div class="custom-form">
		<ul>
			<li><span>身份证号码：</span><input name="idNo" id="idNo"  type="text"   value="${model.idNo}" data-options="required:true,validType:['length[1,18]','htmlUnescape']" /></li>
			<li><span>姓名：</span><input id="name" name="name" type="text"  value="${model.name }" data-options="required:true" /></li>
			<li><span>性别：</span><input id="sex" name="sex" type="text"  value="${model.sex }" data-options="required:true" /></li>
			<li><span>民族：</span><input id="nation" name="nation" type="text"  value="${model.nation}" data-options="required:true<%-- ,url:'${pageScope.basePath}root/nation/combo',panelwidth:'auto' --%>" /></li>
			<li><span>生日：</span><input id="born" name="born" type="text"  value="${model.born}" data-options="required:true" /></li>
			<li><span>地址：</span><input id="address" name="address" type="text"  value="${model.address }" data-options="required:true" /></li>
			<li><span>有效期起：</span><input id="userLifeB" name="userLifeB" type="text"  value="${model.userLifeB }" data-options="required:true" /></li>
			<li><span>有效期止：</span><input id="userLifeE" name="userLifeE" type="text"  value="${model.userLifeE }" data-options="required:true" /></li>
			<li><span>发证机关：</span><input id="polic" name="police" type="text"  value="${model.police }" data-options="required:true" /></li>
			<li><span>照片：</span><input id="photo" name="photo" id="photo1"  value="" data-options="buttonText:'选择',editable:false" /></li>
		</ul>
	</div>
</form>
<script type="text/javascript">
/* function autoSubmit(form){
	$form=$(form);
	$.messager.progress();	// 显示进度条
	$form.form('submit', {
		//url: form.action,
		onSubmit: function(){
			var isValid = $(this).form('validate');
			if (!isValid){
				$.messager.progress('close');	// 如果表单是无效的则隐藏进度条
			}
			return isValid;	// 返回false终止表单提交
		},
		success: function(){
			$.messager.progress('close');	// 如果提交成功则隐藏进度条
			$form.form('clear');
		}
	});


} */
$(function(){
	$('#name').textbox();
	$('#sex').textbox();
	$('#nation').textbox();
	$('#born').textbox();
	$('#address').textbox();
	$('#userLifeB').textbox();
	$('#userLifeE').textbox();
	$('#polic').textbox();
	$('#photo').filebox();
	$('#idNo').textbox();
	var idInp=$('#idNo').textbox().next('span').find('input');
	idInp.focus();
	 /* idInp.blure(function(){
		alert(idInp.val()+"abcd");
	});  */
	//$('#idNo').next('span').find('input').focus();
	
});


</script>
